package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

/**
 * @author 32338
 * @date 2024-04-21 11:31:41
 * @description
 */
public interface OrderService {

    /**
     * @description
     ***:用户下单
     **/
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * @description
     ***:分页查询订单信息
     **/
    PageResult pageQueryUser(Integer pageNum, Integer pageSize, Integer status);

    /**
     * @description
     ***:查询订单详细信息
     **/
    OrderVO details(Long id);

    /**
     * @description
     ***:用户取消订单
     **/
    void userCancelById(Long id) throws Exception;

    /**
     * @description
     ***:再来一单
     **/
    void repetition(Long id);

    /**
     * @description
     ***:订单搜索
     **/
    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    /**
     * @description
     ***:统计各个状态下的订单数量
     **/
    OrderStatisticsVO statistics();

    /**
     * @description
     ***:商家接单
     **/
    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    /**
     * @description
     ***:商家拒单
     **/
    void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;

    /**
     * @description
     ***:商家取消订单
     **/
    void cancel(OrdersCancelDTO ordersCancelDTO) throws Exception;

    /**
     * @description
     ***:派送订单
     **/
    void delivery(Long id) ;

    /**
     * @description
     ***:完成订单
     **/
    void complete(Long id);

    void reminder(Long id);
}
